{% extends "_layout.html" %}

{%- block title -%}
    {%- match err -%}
        {% when AppError::NotFound -%} 404: Not Found
        {% else -%} 500: Internal Server Error
    {%- endmatch -%}
{%- endblock -%}

{%- block content -%}
    <h1>
        {%- match err -%}
            {% when AppError::NotFound -%} 404: Not Found
            {% else -%} 500: Internal Server Error
        {%- endmatch -%}
    </h1>

    {%- match err -%}
        {% when AppError::NotFound -%}
        {% when AppError::Render(err) -%}
            <pre>{{ err }}</pre>
    {%- endmatch -%}

    <h2><a href="/">Back to the first page.</a></h2>
{%- endblock -%}
